package handler

import (
	"github.com/gin-gonic/gin"
	"choujiang/box_server/service"
	"choujiang/common/utils"
	"strconv"
)

func AdvertGet(c *gin.Context) {
	form := c.Request.Form
	advPosition := form.Get("advPosition")
	int64Position, _ := strconv.ParseInt(advPosition, 10, 64)
	advert := service.GetAdvertList(int64Position)
	utils.JSON(advert, c)
}
